<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/css/css/base2.css">
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/css/css/style2.css">
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/My97DatePicker/WdatePicker.js"></script>
<title>订单管理-订单列表</title>
</head>
<body>
	<div class="page">
		<div class="main_menu fl">
			<c:forEach items="${sessionScope.MENU_LIST}" var="mainMenu">
				<c:if test="${mainMenu.wOOpid == 1}">
					<div class="menu_name">
						<a href="${pageContext.request.contextPath}/${mainMenu.wOAction}"
							target="main"> <img
							src="${pageContext.request.contextPath}${mainMenu.wOIcon}">
							<p>${mainMenu.wOName}</p>
						</a>
					</div>
				</c:if>
			</c:forEach>
		</div>
		<div class="main_cont fl">
			<div class="main_cont_top">
				<div class="main_inner clearfix">

					<div class="cont_top_time fr">
						<i> <a
							href="javascript:window.location.reload();">
								<img
								src="${pageContext.request.contextPath}/images/images/refresh.png">刷新
						</a>
						</i>
					</div>
				</div>
			</div>
			<div class="main_cont_top">
						<div class="main_inner clearfix">
							<div class="cont_top_time fr">
								</div>
						</div>
					</div>
			<div class="main_cont_bottom_jiufenzhong">
				<div class="main_inner">
					<ul class="main_cont_title clearfix">
								<li>
									<a href="${pageContext.request.contextPath}/morder/list/all/4/-1/0/1.html" class="on">纠纷中订单</a>
								</li>
								<li>
									<a href="${pageContext.request.contextPath}/morder/list/all/58/-1/0/1.html">退款中订单</a>
								</li>
							</ul>
					<table>
						<tr>
							<th><input type="checkbox" class="checked"></th>
							 <th>订单编号</th> 
							 <th>服务渠道商</th> 
							 <th>订单类型</th>
							 <th>服务地址</th>
							 <th>服务开始时间</th> 
							 <th>取消原因</th>
							 <th>操作</th>
						</tr>

						<c:forEach items="${PAGE_BEAN.dataList}" var="order">
							<tr>
								<td><input type="checkbox" class="checked"
									value="${order.id}" name="idArray"></td>
								<td>${order.wOOrderNo }</td>
								<td>${order.supplierName }</td>
								<td>${order.wOServiceName }</td>
								<td>${order.orderDetailDO.wOAddress }</td>
								<td><fmt:formatDate
										value="${order.orderDetailDO.wOSubscribe }"
										pattern="yyyy-MM-dd HH:mm:ss" /></td>
								<td>${order.orderDetailDO.wCaneclInfo}</td>
								<td>
									<button onclick="window.location.href='${pageContext.request.contextPath}/morder/detail/${order.id}.html'">查看详情</button>
									<button onclick="canecl(${order.id})">确认取消</button>
								</td>
							</tr>
						</c:forEach>

					</table>
					<%@ include file="/WEB-INF/views/page.jsp"%>
				</div>
			</div>
		</div>
	</div>
	</div>
	<script type="text/javascript">
		function canecl(id) {
			 if(id!=""){
				 $.ajax({
					 	url:"/morder/confirmCanecl/"+id+".json",
						success: function(data){
							alert(data.info);
						}
					});
			 }
		}
	</script>
</body>
</html>
